<template>
  <div>

  </div>
</template>

<script setup lang="ts">
import {shallowReactive, shallowRef} from "vue";

  // 浅层次的ref, 只能摸到.value
  // shallowReactive 也只能摸到第一层的
  const person = shallowRef<object>({
    name: "person",
    age: 30
  })
  const car = shallowReactive<object>({
    brand: '五菱宏光',
    option: {
      color: '红色'
    }
  })

  // 关注发生整体的改变
  function changePerson() {
    person.value = {name : 'tony', age: 30};
  }
</script>

<style scoped>

</style>

<script lang="ts">
export default {
  name: "MyTest9.vue"
}
</script>